<?php
use Phalcon\Di;
return array(
    'limit' => array(
        'label' => '获取数量',
        'error' => '',
        'default' => 10,
        'userOptions' => [],
        'description' => '',
        'widget' => 'Numeric',
        'validate' => [],
        'filter' => array('striptags'),
        'attributes' => array(
            'class' => 'form-control',
        ),
        'required' => true,
    ),
    'nodeContentModel' => array(
        'label' => '内容类型',
        'error' => '',
        'userOptions' => [],
        'description' => '',
        'widget' => 'Selects',
        'options' => Di::getDefault()->getShared('entityManager')->contentModelOptions('node'),
        'validate' => [],
        'filter' => array('striptags'),
        'attributes' => array(
            'class' => 'form-control',
        ),
        'required' => false,
    ),
    'state' => array(
        'label' => '状态',
        'error' => '',
        'description' => '',
        'widget' => 'Select',
        'validate' => [],
        'options' => array(
            1 => '正常',
            2 => '垃圾箱',
        ),
        'filter' => array('intval'),
        'attributes' => array(
            'class' => 'form-control',
        ),
        'required' => true,
    ),
    'term' => array(
        'required' => false,
        'left' => true,
        'widget' => 'Tags',
        'access' => array(
            'addForm' => true,
            'editForm' => true,
        ),
        'isArray' => true,
        //'source' => 'term',
        //'taxonomy' => 'tags',
        'term' => [
            //'taxonomy' => 'tags',
            'add' => true
        ],
        'parent' => 0,
        'maxNum' => 10,
        'label' => '标签',
        'description' => '文章标签',
        'error' => '',
        'attributes' => array(
            'class' => 'form-control',
        ),
    ),
    'sort' => array(
        'label' => '内容排序',
        'error' => '',
        'description' => '以哪种方式排序内容',
        'widget' => 'Select',
        'options' => [
            'hot' => '热点文章',
            'new' => '最新文章',
            'browse' => '最多浏览',
            'comment' => '最新评论'
        ],
        'validate' => [],
        'filter' => array('striptags'),
        'attributes' => array(
            'class' => 'form-control',
        ),
        'required' => true,
    ),
    'sign' => array(
        'label' => '附加属性',
        'error' => '',
        'userOptions' => [],
        'description' => '',
        'field' => 'number',
        'widget' => 'Selects',
        'validate' => [],
        'options' => [
            'top' => '置顶',
            'hot' => '热点',
            'essence' => '精华'
        ],
        'filter' => array('striptags'),
        'attributes' => array(
            'class' => 'form-control',
        ),
        'required' => false,
    ),
    'layout' => array(
        'label' => '布局',
        'error' => '',
        'userOptions' => [],
        'description' => '',
        'widget' => 'Select',
        'validate' => [],
        'options' => [
            'list' => '列表',
            'description' => '带描述的列表',
            'image' => '图片列表'
        ],
        'filter' => array('striptags'),
        'attributes' => array(
            'class' => 'form-control',
        ),
        'required' => true,
    ),
    'subLength' => array(
        'label' => '描述截取长度',
        'error' => '',
        'userOptions' => array(),
        'description' => '',
        'widget' => 'Numeric',
        'default' => 200,
        'validate' => array(),
        'filter' => array('striptags'),
        'attributes' => array(
            'class' => 'form-control',
        ),
        'required' => true,
    ),
    'imageSize' => array(
        'label' => '缩略图尺寸',
        'error' => '宽度*高度，如：200*50',
        'userOptions' => array(),
        'description' => '',
        'widget' => 'Text',
        'default' => '200*50',
        'validate' => array(),
        'filter' => array('striptags'),
        'attributes' => array(
            'class' => 'form-control',
        ),
    ),
);
